
print([x * x for x in range(1, 11)])
#输出：
#[1, 4, 9, 16, 25, 36, 49, 64, 81, 100]
list1 = [x * x for x in range(1, 11)]
print(list1)
#输出：
#[1, 4, 9, 16, 25, 36, 49, 64, 81, 100]
print([(x + 1) * x for x in range(1, 11)])
#输出：
#[2, 6, 12, 20, 30, 42, 56, 72, 90, 110]
print([(x + 1) * x for x in range(1, 11,2)])
#输出：
#[2, 12, 30, 56, 90]

print([x for x in range(1,50,2)])
#输出：
#[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49]

print([x+xx for x in 'ABC' for xx in 'DEF'])
#输出：
#['AD', 'AE', 'AF', 'BD', 'BE', 'BF', 'CD', 'CE', 'CF']

